' This program exported from BASIC Anywhere Machine (Version [5.2.3].[2024.09.09.00.00]) on 2024.12.10 at 23:27 (Coordinated Universal Time)
' This program by Charlie Veniot is a port and mod of a SpecBAS program by ZXDunny
alert("At any time, click/touch the screen to restart the program with a different random color palette.")
10 xradius=170 : yradius=150
cx=400 : cy=340 : screen _newimage(cx*2,cy*2,17)
dim p(1440,2,2)
GOSUB Init
30 Do
Cls
scl=1
for i=1 to 2
for angle=1 to 1440
a = _d2r(angle/2)
p(angle,1,i) = cx+(xradius+scl*Sin(xfactor*a))*Cos( a )
p(angle,2,i) = cy+(yradius+scl*Sin(yfactor*a))*Sin( a )
next angle
scl=150
next i
for i=1 to 1440
c = i MOD tc + cm
line ( p(i,1,1),p(i,2,1) ) to ( p(i,1,2),p(i,2,2) ), c
circle ( p(i,1,2),p(i,2,2) ), 2, c, , , ,T
next i
sleep 0.025
xfactor+=.01
yfactor-=.01
IF _MOUSEBUTTON THEN WHILE _MOUSEBUTTON : WEND : GOSUB Init
Loop
Init:
xfactor=10 : yfactor=7
tc = INT( RND * 32 ) + 1 : cm = INT( RND * ( 62 - tc ) ) + 0
RETURN